package br.com.honorato.view;

import javax.faces.context.ExceptionHandler;
import javax.faces.context.ExceptionHandlerFactory;
 
public class ViewExpiredExceptionExceptionHandlerFactory extends ExceptionHandlerFactory 
{
	private ExceptionHandlerFactory parent;
	 
    public ViewExpiredExceptionExceptionHandlerFactory(ExceptionHandlerFactory parent) 
    {
    	this.parent = parent;
    }
 
    @Override
    public ExceptionHandler getExceptionHandler() 
    {
    	ExceptionHandler eh = null;
    	
    	if (parent!=null)
    	{
            eh = parent.getExceptionHandler();
            eh = new ViewExpiredExceptionExceptionHandler(eh);
    	}
        return eh;
    }
}